﻿@{
    Layout = null;
}
@*@model System.Data.DataTable*@
@model System.Collections.IEnumerable
<!DOCTYPE html>
<html>
<head>
    <title>政策鉴定查询</title>
    @if (false)
    {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
     <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/json2.js", true)" type="text/javascript"></script>
    @Html.DevExpress().GetStyleSheets(
                new StyleSheet { ExtensionType = ExtensionType.GridView, Theme = DevExpressHelper.Theme },
                new StyleSheet { ExtensionType = ExtensionType.DropDownEdit, Theme = DevExpressHelper.Theme },
                new StyleSheet { ExtensionType = ExtensionType.ComboBox, Theme = DevExpressHelper.Theme }
)
    <script src="@Url.Content("~/Scripts/checkinput.js")" type="text/javascript"></script>
    <style type="text/css">
        #form_query
        {
        }
        
        input, select
        {
            border: 1px solid #aecaf0;
        }
        input.txt, select.txt
        {
            width: 99%;
        }
        input.btn
        {
            padding: 3px 10px 2px;
            border: #a3c0e8 1px solid;
            background: #e2f0ff url(/EnterpriseFund/DXR.axd?r=0_54) repeat-x 50% top;
            color: #2c4d79;
            cursor: pointer;
        }
        input.btn:hover
        {
            background-image: url(/EnterpriseFund/DXR.axd?r=0_57);
        }
        th
        {
            text-align: right;
        }
    </style>
    <script type="text/javascript">
        var rootUrl = '@Url.Content("~/QueryTaxAuditPolicyEval/")';
        function OnBeginCallback(s, e) {
            e.customArgs["command"] = e.command;


            var fTaxClassAllowanceName = $("#hfTaxClassAllowanceName").val();
            var fYear = $("#hfYear").val();
            var nsrsbh = $("#hnsrsbh").val();
            var nsrbm = $("#hnsrbm").val();
            var nsrmc = $("#hnsrmc").val();
            var fAllowanceName = $("#hfAllowanceName").val();
            var ssRQBeginDate = $("#hssRQBeginDate").val();
            var ssRQEndDate = $("#hssRQEndDate").val();
            var ISBASE = $("#hISBASE").val();

            e.customArgs["ISZF"] = ISBASE;
            e.customArgs["FTaxClassAllowanceName"] = fTaxClassAllowanceName;
            e.customArgs["FYear"] = fYear;
            e.customArgs["nsrsbh"] = nsrsbh;
            e.customArgs["nsrbm"] = nsrbm;
            e.customArgs["nsrmc"] = nsrmc;
            e.customArgs["FAllowanceName"] = fAllowanceName;
            e.customArgs["SSRQBeginDate"] = ssRQBeginDate;
            e.customArgs["SSRQEndDate"] = ssRQEndDate;
        }


        //查询
        function search() {
            $("#hfTaxClassAllowanceName").val(FTaxClassAllowanceName.GetValue());
            $("#hfYear").val(FYear.GetText());
            $("#hnsrsbh").val(Nsrsbh.GetText());
            $("#hnsrbm").val(Nsrbm.GetText());
            $("#hnsrmc").val(Nsrmc.GetText());
            $("#hfAllowanceName").val(FAllowanceName.GetValue());
            $("#hssRQBeginDate").val(SSRQBeginDate.GetText());
            $("#hssRQEndDate").val(sSRQEndDate.GetText());
            $("#hISBASE").val(ISZF1.GetChecked());
            $("#hsearched").val("T");
            gvEditing.Refresh();

        }


        //重置
        function undo() {
            FTaxClassAllowanceName.SetValue("");
            FYear.SetText("");
            Nsrsbh.SetText("");
            Nsrbm.SetText("");
            Nsrmc.SetText("");
            FAllowanceName.SetValue("");
            SSRQBeginDate.SetText("");
            sSRQEndDate.SetText("");
        }

        function MenuTop_emClick(source, e) {
            switch (e.item.name) {
                case "btnExcel":
                    {
                        if ($("#hsearched").val() == "T") {
                            //if (CheckValues())
                            form_query.target = '_self';
                            form_query.action = rootPath + "/QueryTaxAuditPolicyEval/ExportToXls";
                            form_query.submit();
                        }
                        break;


                    }
                case "btnReport":
                    {
                        if ($("#hsearched").val() == "T") {
                            window.showModalDialog(rootPath + "/QueryTaxAuditPolicyEval/Print", window, "dialogWidth=800px;dialogHeight=500px");
                        }
                        //if (CheckValues())
                        //                        form_query.target = '_blank';
                        //                        //  form_query.target = 'parent.contentframe';
                        //                        //  parent.contentframe.url(
                        //                        form_query.action = rootPath + "/QueryTaxAuditPolicyEval/Print";
                        //                        form_query.submit();
                        break;


                    }
                case "btnGridShow":
                    {
                        gvEditing.ShowCustomizationWindow();
                        break;
                    }
		
            }
        }
        function Changed() { 
            var fyear = FYear.GetText();
            $.ajax({
                type: 'POST',
                url: rootUrl + 'GetList',
                data: { FYear: fyear },
                success: function (result) {
                    ASPxClientComboBox.Cast("FTaxClassAllowanceName").ClearItems()
                    var List = JSON.parse(result);
                    for (var i = 0; i < List.length; i++) {
                        ASPxClientComboBox.Cast("FTaxClassAllowanceName").AddItem(List[i].FTaxClassAllowanceName, List[i].FTaxClassAllowanceNo, "");
                    }
                }
            });
        }
        function keyPress() {
            if (event.keyCode && event.keyCode == 13) {
                search();

            }

        }
    </script>
</head>
<body  onkeypress="keyPress()">
    @Html.Partial("LoadPanelPartial")
    @Html.DevExpress().Menu(settings =>
{
    settings.Name = "toolBarMenu";
    settings.ItemAutoWidth = false;
    settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
    settings.Styles.Style.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
    settings.Styles.Style.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
    settings.Items.Add(item =>
    {
        item.Name = "btnExcel";
        item.Text = "导出Excel";
        item.Image.Url = Url.Content("~/Content/ControlImages/excel.png");
    });
    settings.Items.Add(item =>
    {
        item.Name = "btnReport";
        item.Text = "打印";
        item.Image.Url = Url.Content("~/Content/icons/print.png");
    });


    settings.Items.Add(item =>
    {
        item.Name = "btnGridShow";
        item.Text = "选择列";
        item.Image.Url = Url.Content("~/Content/FunctionImages/AllowanceFileAudit.png");
    });
	
    settings.ClientSideEvents.ItemClick = "function(source,e){MenuTop_emClick(source,e)}";
    settings.ItemLinkMode = ItemLinkMode.ContentBounds;
}).GetHtml()
    @using (Html.BeginForm("ExportToXls", "QueryTaxAuditPolicyEval", FormMethod.Post, new { id = "form_query" }))
    {

@* <form name="form_query" id="form_query" method="post" class="form_query" action="@Url.Content("~/QuerySpecificAdjust/index")">*@
        <table class="query" width="800px" style="margin-left: auto; margin-right: auto">
            <tr>
                <td align="right" style="text-align:right">
                    纳税人识别号：
                </td>
                <td>
                 <table>
                        <tr>
                            <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "Nsrsbh";
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(130);
               }).GetHtml()
                 </td>
                        </tr>
                    </table></td>
                <td align="right" style="text-align:right">
                    年度：
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "FYear";
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(100);
                   settings.Properties.ClientSideEvents.TextChanged = "Changed";
               }).GetHtml()
                </td>
                <td align="right" style="text-align:right">
                    征收项目：
                </td>
                <td>
                    @Html.DevExpress().ComboBox(settings =>
               {
                   settings.Name = "FTaxClassAllowanceName";
                   settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(100);
                   settings.Properties.TextField = "FTaxClassAllowanceName";
                   settings.Properties.ValueField = "FTaxClassAllowanceNo";
                   settings.Properties.EnableClientSideAPI = true;
               }).Bind(ViewBag.FTaxClassAllowanceName).GetHtml()
                </td>
                <td>  
                <table>
                <tr>
                <td>
                @Html.DevExpress().Button(settings =>
               {
                   settings.Name = "btnSearch";
                   settings.Text = "查询";
                   settings.ControlStyle.CssClass = "button";
                   settings.Images.Image.Url = Url.Content("~/Content/ControlImages/search.png");
                   settings.ClientSideEvents.Click = "search";
               }).GetHtml()</td>
                <td>
                    @Html.DevExpress().Button(settings =>
               {
                   settings.Name = "btnUndo";
                   settings.Text = "重置";
                   settings.ControlStyle.CssClass = "button";
                   settings.Images.Image.Url = Url.Content("~/Content/ControlImages/undo_blue.png");
                   settings.ClientSideEvents.Click = "undo";
               }).GetHtml()
               </td></tr></table> 
               </td>
            </tr>
            <tr>
                <td align="right" style="text-align:right">
                    纳税人名称：
                </td>
                <td>
                 <table>
                        <tr>
                            <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "Nsrmc";
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(130);
               }).GetHtml()
                 </td>
                        </tr>
                    </table></td>
                <td align="right" style="text-align:right">
                    补贴类型：
                </td>
                <td>
                    @Html.DevExpress().ComboBox(settings =>
               {
                   settings.Name = "FAllowanceName";
                   settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(100);
                   settings.Properties.TextField = "FAllowanceName";
                   settings.Properties.ValueField = "FAllowanceClassNo";
               }).BindList(ViewBag.FAllowanceNames).Bind(ViewBag.FAllowanceName).GetHtml()
                </td>
                <td align="right" style="text-align:right">
                    纳税人编码：
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "Nsrbm";
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(100);
               }).GetHtml()
                </td>
                <td>
                 @Html.DevExpress().CheckBox(settings =>
              {
                  settings.Name = "ISZF1";
                  settings.Text = "不包括已作废";
                  settings.Checked = true;
                  // settingsCheckBox.Properties.ClientSideEvents.CheckedChanged = string.Format("function(s, e) {{ if(s.GetChecked()) {0}.SelectAllRowsOnPage(); else {0}.UnselectAllRowsOnPage(); }}", settings.Name);


                  //      settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                  //settings.Properties.ValidationSettings.EnableCustomValidation = true;

              }).GetHtml()
                
                </td>
            </tr>
            <tr>
             <td align="right" style="text-align:right">
                    补贴额：
                </td>
                <td>
                    <table>
                        <tr>
                            <td>
                                @Html.DevExpress().TextBox(settings =>
                           {
                               settings.Name = "SSRQBeginDate";
                               settings.Width = System.Web.UI.WebControls.Unit.Pixel(60);
                           }).GetHtml()
                            </td>
                            <td align="center">
                                -
                            </td>
                            <td>
                                @Html.DevExpress().TextBox(settings =>
                           {
                               settings.Name = "sSRQEndDate";
                               settings.Width = System.Web.UI.WebControls.Unit.Pixel(60);
                           }).GetHtml()
                            </td>
                        </tr>
                    </table>
                </td>
               
               
               
            </tr>
          
        </table>
        @Html.Partial("QueryTaxAuditPolicyEvalListPartial", Model)
         @Html.Hidden("hfTaxClassAllowanceName", "");
					   @Html.Hidden("hfYear", "");
					    @Html.Hidden("hnsrsbh", "");
						 @Html.Hidden("hnsrbm", "");
						  @Html.Hidden("hnsrmc", "");
                              @Html.Hidden("hfAllowanceName", "");
					   @Html.Hidden("hssRQBeginDate", "");
					    @Html.Hidden("hssRQEndDate", "");
						 @Html.Hidden("hISBASE", "");
                           @Html.Hidden("hsearched", "F")
    }
    <script type="text/javascript">        Changed();</script>
</body>
</html>
<script>
    lp.Hide();
</script>
